CMAKE_MINIMUM_REQUIRED(VERSION 3.22)
PROJECT(compile_options_test)

ADD_LIBRARY(test test.cpp)
TARGET_COMPILE_OPTIONS(test
                        PUBLIC -Wunused-variable
                        PRIVATE -Wreturn-type
                        INTERFACE -Wuninitialized)

ADD_EXECUTABLE(main main.cpp)
TARGET_COMPILE_OPTIONS(main
                        PRIVATE -Wunused-parameter)

TARGET_LINK_LIBRARIES(main test)

